//
//  ZDDColorLabel.m
//  QQ音乐(皇家尊享版)
//
//  Created by 周冬冬 on 16/7/21.
//  Copyright © 2016年 我的mac. All rights reserved.
//

#import "ZDDColorLabel.h"

@implementation ZDDColorLabel

- (void)drawRect:(CGRect)rect {
    // Drawing code
    [super drawRect:rect];
    
    //设置填充颜色
    [[UIColor greenColor] setFill];
    //设置填充区域
    rect = CGRectMake(rect.origin.x, rect.origin.y, rect.size.width * self.progress, rect.size.height);
    //渲染
    UIRectFillUsingBlendMode(rect, kCGBlendModeSourceIn);
    



}
-(void)setProgress:(CGFloat)progress{

    _progress = progress;
    [self setNeedsDisplay];


}
@end
